import { defineStore } from 'pinia'
import { ref } from 'vue'

const useUserStore = defineStore(
  'user',
  () => {
    const token = ref('')
    const userId = ref('')

    const clearToken = () => {
      token.value = ''
    }

    return { token, clearToken, userId }
  },
  { unistorage: true }
)

export default useUserStore
